package com.slz3.business.module.goodsManagement.gooBaseGoodsAttributeValue.repository;

import com.slz3.business.frame.module.Repositorys;
import com.slz3.business.frame.util.VE;
import com.slz3.business.module.goodsManagement.gooBaseGoodsAttributeValue.domain.GooBaseGoodsAttributeValue;
import com.slz3.business.module.goodsManagement.gooBaseGoodsAttributeValue.domain.GooBaseGoodsAttributeValueCondition;
import com.slz3.business.module.goodsManagement.gooBaseGoodsAttributeValue.steward.GooBaseGoodsAttributeValueSpecification;

import java.util.List;
import java.util.UUID;

public class GooBaseGoodsAttributeValueCustomizedRepositoryImpl implements GooBaseGoodsAttributeValueCustomizedRepository {

    @Override
    public void test() {
        System.err.println(Repositorys.gooBaseGoodsAttributeValue);
        System.err.println("test: customized repository");
    }

    @Override
    public List<GooBaseGoodsAttributeValue> findByUpperList(List<UUID> gooBaseGoodsUUID) {

        if (VE.isEmpty(gooBaseGoodsUUID)) {
            return null;
        }

        GooBaseGoodsAttributeValueCondition condition = new GooBaseGoodsAttributeValueCondition();
        condition.setUpperList(gooBaseGoodsUUID);

        return Repositorys.gooBaseGoodsAttributeValue.findAll(GooBaseGoodsAttributeValueSpecification.findJoin(condition));

    }

}
